package tr.edu.metu.is.mega.server.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 * The persistent class for the scheduletemplate database table.
 * 
 */
@Entity
public class Scheduletemplate implements Serializable, tr.edu.metu.is.mega.server.core.BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer pkid;

    private String description;

    private String shortname;

    // bi-directional many-to-one association to Activity
    @OneToMany(mappedBy = "scheduletemplate", cascade = CascadeType.ALL, orphanRemoval = true)
    private List<Activitytemplate> activities;

    /**
     * Default constructor.
     */
    public Scheduletemplate() {
    }

    /**
     * Returns pkid.
     * 
     * @return the pkid
     */
    @Override
    public Integer getPkid() {
        return pkid;
    }

    /**
     * Sets pkid value.
     * 
     * @param pkid the pkid to set
     */
    @Override
    public void setPkid(Integer pkid) {
        this.pkid = pkid;
    }

    /**
     * Returns description.
     * 
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description value.
     * 
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Returns shortname.
     * 
     * @return the shortname
     */
    public String getShortname() {
        return shortname;
    }

    /**
     * Sets shortname value.
     * 
     * @param shortname the shortname to set
     */
    public void setShortname(String shortname) {
        this.shortname = shortname;
    }

    /**
     * Returns activities.
     * 
     * @return the activities
     */
    public List<Activitytemplate> getActivities() {
        return activities;
    }

    /**
     * Sets activities value.
     * 
     * @param activities the activities to set
     */
    public void setActivities(List<Activitytemplate> activities) {
        this.activities = activities;
    }

}
